<template>
    <div id="app">
        <header class="app-header">
            <router-link :to="{ name: r.name }" v-for="(r, i) in routes" :key="i">
                {{ r.name }}
            </router-link>
        </header>
        <router-view class="app-body" />
    </div>
</template>

<script>
import { routes } from './router';
export default {
    inheritAttrs: false,
    props: {},
    data() {
        return {
            routes,
        };
    },
    components: {},
    computed: {},
    created() {},
    mounted() {},
    methods: {},
};
</script>
<style lang="scss" scoped>
#app {
    width: 100%;
    height: 100%;
}
.app-header {
    height: 50px;
    line-height: 50px;
    text-align: center;
    > a {
        text-decoration: underline;
        margin-right: 10px;
    }
}
.app-body {
    width: 100%;
    height: calc(100% - 50px);
    box-sizing: border-box;
}
</style>
